only support changing gpsbabel.org location at build generation time. (#813)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 6 Jan 2022 00:36:02 +0000 (17:36 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Jan 2022 00:36:02 +0000 (17:36 -0700)
CMakeLists.txt
GPSBabel.pro
tools/.gitignore
tools/make_gpsbabel_org_wrapper.sh.in [deleted file]

index 29eed049978e1f7cb88af22aad5cb2f6aacf7367..19b93b3e9deb11b552062d941e76e1aa08ad2b7d 100644 (file)
@@ -520,22 +520,8 @@ endif()
 
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
   set(WEB "../babelweb" CACHE PATH "Path where the documentation will be stored for www.gpsbabel.org.")
-  # If using a makefile generator WEB can be overridden on the make
-  # command line, e.g.  make gpsbabel.org WEB=/tmp.  If not overridden on
-  # the make command line, or not using a makefile generator, or if using
-  # "cmake --build dir --target gpsbabel.org", then the cache variable
-  # WEB will be used.  The cache variable can be overridden in the usual
-  # way when configuring, i.e. "cmake dir -DWEB:PATH=/tmp".
-
-  # FIXME: Is overriding WEB on the make command line worth the trouble of
-  # using configure_file to build a wrapper script?
-
-  configure_file(${CMAKE_SOURCE_DIR}/tools/make_gpsbabel_org_wrapper.sh.in
-                 ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh
-                 @ONLY
-                 NEWLINE_STYLE LF)
   add_custom_target(gpsbabel.org
-                    ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh
+                    ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org.sh ${WEB} ${DOCVERSION}
                     DEPENDS gpsbabel gpsbabel.pdf)
 endif()
 
index 0136041311c15b2511d718f41e18d147a721827f..98b25c7d27f68daf8e928a16c4db2b9b090888f4 100644 (file)
@@ -397,10 +397,7 @@ equals(PWD, $${OUT_PWD}) {
   !defined(WEB, var) {
     WEB = ../babelweb
   }
-  # Allow WEB to be overridden when running make.
-  # DOCVERSION must be overridden at qmake time as it also affects the object code.
-  gpsbabel.org.commands += web=\$\${WEB:-$${WEB}};
-  gpsbabel.org.commands += tools/make_gpsbabel_org.sh \"\$\${web}\" $$shell_quote($$DOCVERSION);
+  gpsbabel.org.commands += tools/make_gpsbabel_org.sh $$shell_quote($$WEB) $$shell_quote($$DOCVERSION);
 } else {
   gpsbabel.org.commands += echo "target gpsbabel.org is not supported for out of source builds.";
   gpsbabel.org.commands += exit 1;
index 9b2452f41943b352f4b459ec9355d98aa8fc225f..9ceead247362c71c31ca06b5ba7211efe8e79840 100644 (file)
@@ -1,2 +1 @@
 /mkcapabilities
-/make_gpsbabel_org_wrapper.sh
diff --git a/tools/make_gpsbabel_org_wrapper.sh.in b/tools/make_gpsbabel_org_wrapper.sh.in
deleted file mode 100755 (executable)
index fcf2b06..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -e
-
-web=${WEB:-@WEB@}
-"@CMAKE_SOURCE_DIR@/tools/make_gpsbabel_org.sh" "${web}" "@DOCVERSION@"